<template>
  <BaseFilter class="search-filter" :label="label">
    <van-search style="padding: 0px; margin-top: 8px;"
      :value="value"
      placeholder="请输入关键词"
      @input="onChange"
      @clear="(e) => onChange()"
    />
  </BaseFilter>
</template>

<script>
import BaseFilter from './BaseFilter.vue';

export default {
  name: 'switchFilter',
  props: {
    label: {
      type: String
    },
    value: {
      type: String
    }
  },
  components: {
    BaseFilter
  },
  methods: {
    onChange (value) {
      this.$emit('input', value);
      this.$emit('change', value);
    }
  }
}
</script>

<style>
</style>
